
# -*- coding: utf-8 -*-
__author__ = 'wangleijie'
# socket server ;

import  socket
s = socket.socket();
hostname = socket.gethostname();
port = 1234;
s.bind((hostname, port));
s.listen(5);
while True:
    (c, addr) = s.accept();
    print "Got Connect From ", addr
    c.send("thanks for connecting");
    c.close();